Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@sitecore-cloudsdk/core
Advanced tools
This package is for initializing the Cloud SDK and its other packages in your app.
This package is for initializing the Cloud SDK and its other packages in your app.
npm install @sitecore-cloudsdk/core
To initialize other Cloud SDK packages, first install them:
npm install @sitecore-cloudsdk/events
npm install @sitecore-cloudsdk/personalize
CloudSDK
function, available in the core
package.Initialize the Cloud SDK and its packages on the browser side:
'use client';
import { useEffect } from 'react';
import { CloudSDK } from '@sitecore-cloudsdk/core/browser';
import '@sitecore-cloudsdk/events/browser';
import '@sitecore-cloudsdk/personalize/browser';
export default function Home() {
useEffect(() => {
CloudSDK({
sitecoreEdgeContextId: '<YOUR_CONTEXT_ID>',
siteName: '<YOUR_SITE_NAME>',
enableBrowserCookie: true
})
.addEvents() // Initialize the `events` package.
.addPersonalize({ enablePersonalizeCookie: true, webPersonalization: true }) // Initialize the `personalize` package and enable web personalization.
.initialize();
}, []);
return <></>;
}
Initialize the Cloud SDK and its packages on the server side:
import type { NextRequest, NextResponse } from 'next/server';
import { CloudSDK } from '@sitecore-cloudsdk/core/server';
import '@sitecore-cloudsdk/events/browser';
import '@sitecore-cloudsdk/personalize/browser';
export async function middleware(request: NextRequest) {
const response = NextResponse.next();
await CloudSDK(request, response, {
sitecoreEdgeContextId: '<YOUR_CONTEXT_ID>',
siteName: '<YOUR_SITE_NAME>',
enableServerCookie: true
})
.addEvents() // Initialize the `events` package.
.addPersonalize({ enablePersonalizeCookie: true }) // Initialize the `personalize` package.
.initialize();
return response;
}
FAQs
This package is for initializing the Cloud SDK and its other packages in your app.
The npm package @sitecore-cloudsdk/core receives a total of 15,098 weekly downloads. As such, @sitecore-cloudsdk/core popularity was classified as popular.
We found that @sitecore-cloudsdk/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.